package model

import "ginProject/biz/dao"

type ProductPicInfo struct {
	ID           int
	ProductId    int
	PicDesc      string
	PicUrl       string
	IsMaster     int
	CreateTime   string
	PicOrder     int
	ModifiedTime string
}

/**
 * @Author leibidong
 * @Description 给商品插入图片
 * @Date  2021/7/5 13:49
 **/
func InsertProductPic(info ProductPicInfo) {
	db := dao.InitDB()
	db.Exec("insert into product_pic_info(product_id,pic_desc,pic_url,is_master,create_time,modified_time)"+
		" values(?,?,?,?,?,?)", info.ProductId, info.PicDesc, info.PicUrl, info.IsMaster, info.CreateTime, info.ModifiedTime)
}
